package team.headnurse.nursemanagement.serializable;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author Eugene-Forest
 */
public class StaffTimePk implements Serializable {

    private String staffId;

    private int timeId;

    public StaffTimePk() {
    }

    public StaffTimePk(String staffId, int timeId) {
        this.staffId = staffId;
        this.timeId = timeId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        StaffTimePk that = (StaffTimePk) o;
        return timeId == that.timeId && Objects.equals(staffId, that.staffId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(staffId, timeId);
    }

    public String getStaffId() {
        return staffId;
    }

    public void setStaffId(String staffId) {
        this.staffId = staffId;
    }

    public int getTimeId() {
        return timeId;
    }

    public void setTimeId(int timeId) {
        this.timeId = timeId;
    }
}
